<template>
  <div class="container login-container">
    <el-container>
      <el-aside style="width: 50%; background-color: #fff">
        <img src="../../../assets/images/3.png" alt="" />
      </el-aside>
      <el-main>
        <p>总部加盟管理系统（贝尔数智云）</p>
        <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
          <ul>
            <li>
              <el-form-item prop="account" class="item">
                <img src="../../../assets/images/1.png" alt="" />
                <el-input type="text" name="account" v-model="loginForm.account" ref="account" tabindex="1" :placeholder="$t('login.username')" @change="getConfig" />
              </el-form-item>
            </li>
            <li>
              <el-form-item prop="password" class="item">
                <img src="../../../assets/images/2.png" alt="" />
                <el-input type="password" name="password" v-model="loginForm.password" ref="password" tabindex="2" :placeholder="$t('login.password')" show-password />
              </el-form-item>
            </li>
            <li class="bottom">
              <el-button :loading="loading" type="primary" round @click.native.prevent="handleLogin">
                {{ $t('login.logIn') }}
              </el-button>
            </li>
          </ul>
        </el-form>
      </el-main>

      <custom-form v-if="formVisible" ref="CustomForm" />
    </el-container>
  </div>
</template>
<script>
export { default } from './index.js'
</script>
<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
}
.container {
  width: 100%;
  height: 100%;
  background-image: url(../../../assets/images/4.jpg);
  background-size: 100% 100%;
  padding-top: 10%;
  box-sizing: border-box;
}

.container > .el-container {
  width: 50%;
  max-width: 900px;
  min-width: 600px;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 20px;
  padding: 50px 0;
}
.container > .el-container >>> .el-form-item__content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.el-aside {
  text-align: center;
  padding: 40px;
}
.el-main {
  padding-right: 80px;
}
.el-aside img {
  width: 100%;
}
.el-main p {
  font-size: 25px;
  margin-bottom: 10px;
  margin-top: 40px;
}
.el-main > span {
  color: #bfbfbf;
  font-size: 20px;
}
.el-main ul {
  margin-top: 70px;
}
.el-main ul li {
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 10px;
  margin: 20px 0;
}
.el-main ul .bottom {
  border-bottom: none;
  margin-top: 60px;
}
.el-main ul li img {
  width: 25px;
  vertical-align: middle;
}
.el-main ul li input {
  width: 80%;
  border: none;
  outline: none;
  padding-left: 10px;
  font-size: 16px;
}
.el-main ul li button {
  width: 90%;
  color: #fff;
  display: block;
  margin: 20px auto;
  font-size: 20px;
}
</style>
